import Vue from 'vue'
import Router from 'vue-router'
//import Hello from '@/pages/index'


const index = resolve => {require(['../pages/goods/index'], resolve)};    //引用首页
const header = resolve => {require(['../components/header/header'], resolve)};    //头
const footer = resolve => {require(['../components/footer/footer'], resolve)};		//脚
const landing = resolve => {require(['../pages/other/landing'], resolve)};		//登录
const weixinLoginEmptyPage = resolve => {require(['../pages/other/weixinLoginEmptyPage'], resolve)};		//微信登录空白页面
const weixinPayEmptyPage = resolve => {require(['../pages/other/weixinPayEmptyPage'], resolve)};		//微信支付空白页面
const reg = resolve => {require(['../pages/other/reg'], resolve)};		//注册
const upgrade = resolve => {require(['../pages/other/upgrade'], resolve)};		//升级
const goodsList = resolve => {require(['../pages/goods/goodsList'], resolve)};		//商品列表
const goodsDetails = resolve => {require(['../pages/goods/goodsDetails'], resolve)};		//商品详情
const goodsCategory = resolve => {require(['../pages/goods/goodsCategory'], resolve)};		//商品分类
const shopingCart = resolve => {require(['../pages/order/shopingCart'], resolve)};		//购物车
const saveOrder = resolve => {require(['../pages/order/saveOrder'], resolve)};		//订单填写
const orderPayType = resolve => {require(['../pages/order/orderPayType'], resolve)};		//支付方式
const invoiceInfo = resolve => {require(['../pages/order/invoiceInfo'], resolve)};		//发票信息
const orderGoodsList = resolve => {require(['../pages/order/orderGoodsList'], resolve)};		//订单商品清单
const orderDetail = resolve => {require(['../pages/order/orderDetail'], resolve)};		//订单详情
const orderList = resolve => {require(['../pages/order/orderList'], resolve)};		//订单列表
const wxList = resolve => {require(['../components/orderListComponents/wxListComponents'], resolve)};		//订单wx列表
const cancList = resolve => {require(['../components/orderListComponents/cancListComponents'], resolve)};		//订单canc列表
const finishList = resolve => {require(['../components/orderListComponents/finishListComponents'], resolve)};		//订单finish列表
const unpaidList = resolve => {require(['../components/orderListComponents/unpaidListComponents'], resolve)};		//订单unpaid列表
const waitingList = resolve => {require(['../components/orderListComponents/waitingListComponents'], resolve)};		//订单waiting列表
const my = resolve => {require(['../pages/my/my'], resolve)};		//我的
const account = resolve => {require(['../pages/my/account'], resolve)};		//我的
const deliverys = resolve => {require(['../pages/my/deliverys'], resolve)};		//收货地址
const addDelivery = resolve => {require(['../pages/my/addDelivery'], resolve)};	//新增收货地址
const updateDelivery = resolve => {require(['../pages/my/updateDelivery'], resolve)};	//修改收货地址
const orderPay = resolve => {require(['../pages/order/orderPay'], resolve)};	//选择支付方式
const addinvoiceInfo = resolve => {require(['../pages/order/addinvoiceInfo'], resolve)};	//选择支付方式
const accountSecurity = resolve => {require(['../pages/my/accountSecurity'], resolve)};	//账户安全
const payPassword = resolve => {require(['../pages/my/payPassword'], resolve)};	//支付密码设置
const updatePassword = resolve => {require(['../pages/my/updatePassword'], resolve)};	//修改密码
const updatePhone = resolve => {require(['../pages/my/updatePhone'], resolve)};	//修改手机号
const forgetPassword = resolve => {require(['../pages/my/forgetPassword'], resolve)};	//忘记密码
const aboutUs = resolve => {require(['../pages/my/aboutUs'], resolve)};	//关于我们

const chatList = resolve => {require(['../pages/rongcloud/chatList'], resolve)};    //引用聊天LIST页面
const chatDetail = resolve => {require(['../pages/rongcloud/chatDetail'], resolve)};    //引用聊天对话页面

const shopMine = resolve => {require(['../pages/shop/shopMine'], resolve)};    //我的店铺
const shopBonus = resolve => {require(['../pages/shop/shopBonus'], resolve)};    //我的奖励
const shopBonusMore = resolve => {require(['../pages/shop/shopBonusMore'], resolve)};    //我的奖励明细
const shopGoodControl = resolve => {require(['../pages/shop/shopGoodControl'], resolve)};    //店铺主页
const shopManage = resolve => {require(['../pages/shop/shopManage'], resolve)};    //店铺管理
const modifyShopManage = resolve => {require(['../pages/shop/modifyShopManage'], resolve)};    //店铺信息修改页面
const editShopGoods = resolve => {require(['../pages/shop/editShopGoods'], resolve)};    //商品修改
const shopHomePage = resolve => {require(['../pages/distributionStore/shopHomePage'], resolve)};    //店铺主页
const bill = resolve => {require(['../pages/distributionStore/bill'], resolve)};    //店铺订单
const cartShopping = resolve => {require(['../pages/distributionStore/cartShopping'], resolve)};    //店铺购物车
const classify = resolve => {require(['../pages/distributionStore/classify'], resolve)};    //店铺分类
const shopGoodsDetails = resolve => {require(['../pages/distributionStore/shopGoodsDetails'], resolve)};    //店铺商品详情


Vue.use(Router)

export default new Router({
  routes: [
  	{
      path: '/',
      name: 'index',
      component: index //首页
    },
    {
      path: '/index',
      name: 'index',
      component: index //首页
    },
     {
      path: '/header',
      name: 'header',
      component: header		//头
    },
     {
      path: '/footer',
      name: 'footer',
      component: footer		//脚
    },
     {
      path: '/landing',
      name: 'landing',
      component: landing		//登录
    },
    {
      path: '/reg',
      name: 'reg',
      component: reg		//注册
    },
    {
      path: '/weixinLoginEmptyPage',
      name: 'weixinLoginEmptyPage',
      component: weixinLoginEmptyPage		//微信登录空白页面
    },
    {
      path: '/weixinPayEmptyPage',
      name: 'weixinPayEmptyPage',
      component: weixinPayEmptyPage		//微信支付空白页面
    },
    {
      path: '/upgrade',
      name: 'upgrade',
      component: upgrade		//升级
    },
    {
      path: '/goodsList',
      name: 'goodsList',
      component: goodsList		//商品列表
    },
    {
      path: '/goodsDetails',
      name: 'goodsDetails',
      component: goodsDetails		//商品列表
    },
    {
      path: '/goodsCategory',
      name: 'goodsCategory',
      component: goodsCategory	//商品分类
    },
    {
      path: '/orderList',
      name: 'orderList',
      component: orderList,		//订单列表
      children:[{
      	path:'',
      	components:{
      		wx:wxList,
      		canc:cancList,
      		finish:finishList,
      		unpaid:unpaidList,
      		waiting:waitingList
      	}
      }],
    },
    {
      path: '/shopingCart',
      name: 'shopingCart',
      component: shopingCart		//购物车
    },
    {
      path: '/saveOrder',
      name: 'saveOrder',
      component: saveOrder		//订单填写
    },
    {
      path: '/orderPayType',
      name: 'orderPayType',
      component: orderPayType		//支付方式
    },
    {
      path: '/invoiceInfo',
      name: 'invoiceInfo',
      component: invoiceInfo		//发票信息
    },
    {
      path: '/orderGoodsList',
      name: 'orderGoodsList',
      component: orderGoodsList		//订单商品清单
    },
    {
      path: '/orderDetail',
      name: 'orderDetail',
      component: orderDetail		//订单详情
    },
    {
      path: '/my',
      name: 'my',
      component: my		//我的
    },
     {
      path: '/account',
      name: 'account',
      component: account		//账号管理
    },
    {
      path: '/deliverys',
      name: 'deliverys',
      component: deliverys		//收货地址
    },
    {
      path: '/addDelivery',
      name: 'addDelivery',
      component: addDelivery		//新增收货地址
    },
    {
      path: '/updateDelivery',
      name: 'updateDelivery',
      component: updateDelivery		//修改收货地址
    },
    {
      path: '/orderPay',
      name: 'orderPay',
      component: orderPay		//选择支付方式
    },
    {
      path: '/addinvoiceInfo',
      name: 'addinvoiceInfo',
      component: addinvoiceInfo		//选择支付方式
    },
    {
      path: '/chatList',
      name: 'chatList',
      component: chatList
    },
    {
      path: '/chatDetail',
      name: 'chatDetail',
      component: chatDetail
    },
    {
      path: '/accountSecurity',		//账户安全
      name: 'accountSecurity',
      component: accountSecurity
    },
    {
      path: '/payPassword',		//支付密码设置
      name: 'payPassword',
      component: payPassword
    },
    {
      path: '/updatePassword',		//修改密码
      name: 'updatePassword',
      component: updatePassword
    },
    {
      path: '/updatePhone',		//修改手机号
      name: 'updatePhone',
      component: updatePhone
    },
    {
      path: '/forgetPassword',		//忘记密码
      name: 'forgetPassword',
      component: forgetPassword
    },
    {
      path: '/aboutUs',		//关于我们
      name: 'aboutUs',
      component: aboutUs
    },
    {
      path: '/shopMine',		//我的店铺
      name: 'shopMine',
      component: shopMine
    },
    {
      path: '/shopBonus',		//我的店铺
      name: 'shopBonus',
      component: shopBonus
    },
    {
      path: '/shopBonusMore',		//我的店铺
      name: 'shopBonusMore',
      component: shopBonusMore
    },
    {
      path: '/shopHomePage',		//店铺主页
      name: 'shopHomePage',
      component: shopHomePage
    },
    {
      path: '/bill',		//店铺订单
      name: 'bill',
      component: bill
    },
    {
      path: '/shopGoodsDetails',		//店铺商品详情
      name: 'shopGoodsDetails',
      component: shopGoodsDetails
    },
    {
      path: '/cartShopping',		//店铺购物车
      name: 'cartShopping',
      component: cartShopping
    },
    {
      path: '/classify',		//店铺分类
      name: 'classify',
      component: classify
    },
    {
      path: '/shopManage',		//店铺管理
      name: 'shopManage',
      component: shopManage
    },
    {
      path: '/modifyShopManage',		//店铺信息修改页面
      name: 'modifyShopManage',
      component: modifyShopManage
    },
    {
      path: '/editShopGoods',		//商品修改
      name: 'editShopGoods',
      component: editShopGoods
    },
    {
      path: '/shopGoodControl',		//商品管理
      name: 'shopGoodControl',
      component: shopGoodControl
    },
  ]
})
